<!DOCTYPE html>
<html>
<head>
	 <style>
	.focused {
	    background: #abcdef;
	}
	</style>
	<script type="text/javascript" src="static/js/jquery/jquery-2.2.4.min.js">
	</script>
</head>
<body>
 
<div id="content">
    <input tabIndex="1">
    <input tabIndex="2">
    <select tabIndex="3">
        <option>select menu</option>
    </select>
    <div tabIndex="4">
        a div
    </div>
</div>
 
<script>

$("#content").delegate("*", "focus blur", function(event) {
    var elem = $(this);
    
    setTimeout(function() {
       elem.toggleClass("focused", elem.is(":focus"));
    }, 2000);
});
</script>
 
</body>
</html>